﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using ZSZ.Core.Entities;

namespace ZSZ.EntityFramework.ModelConfig
{
    class PermissionConfig : EntityTypeConfiguration<PermissionEntity>
    {
        
        public override void Map(EntityTypeBuilder<PermissionEntity> builder)
        {
            builder.ToTable("T_Permissions");
            builder.Property(p => p.Description).HasMaxLength(1024);
            builder.Property(p => p.Name).IsRequired().HasMaxLength(50);
        }
    }
}
